#include<linux/module.h>

static int num = 0;
static char* my_str="nihao kernel";


module_param(num,int,S_IRUGO);
module_param(my_str,charp,S_IRUGO);

static int __init hello_init(void){
	if(num==0){
		printk("hello kernel\n");
	}else{
		printk("hi kernel\n");
	}
	printk("%s\n",my_str);
	return 0;
}

static void __exit hello_exit(void){
	printk("bye bye kernel\n");
}

module_init(hello_init);
module_exit(hello_exit);

MODULE_LICENSE("GPL");
MODULE_AUTHOR("zhuzonghui <puchuchen@outlook.com>");
MODULE_DESCRIPTION("This is my first kernel module,it print hello");
